package com.kymatrix.kycarbon.xsmd.system.server.model.form.module;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

/**
 * @author liujie
 * @date 2024-03-02
 */
@ApiModel("排序模块请求")
@Data
public class SortModuleReq {

    @ApiModelProperty(value = "排序模块列表")
    @NotEmpty(message = "排序模块列表不能为空")
    private List<SortModule> sortModules;

    @Data
    @ApiModel("排序模块")
    @Validated
    public static class SortModule {
        
        @ApiModelProperty(value = "模块id", required = true)
        @NotEmpty(message = "id 不能为空")
        private String id;

        @ApiModelProperty(value = "排序", required = true)
        @NotNull(message = "排序 不能为空")
        private Integer sortNo;
    }
    
}
